Skip to content

fix(wis): remove redundant agent handoff workflow - #770

Merged
rafaelscosta merged 1 commit into
mainfrom
fix/remove-agent-handoff-workflow
May 18, 2026
Merged

fix(wis): remove redundant agent handoff workflow#770
rafaelscosta merged 1 commit into
mainfrom
fix/remove-agent-handoff-workflow

Conversation

@rafaelscosta

@rafaelscosta rafaelscosta commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Removes the redundant agent_handoff workflow from .aiox-core/data/workflow-patterns.yaml.
  • Moves the useful QA handoff signals into story_development so fix-qa-issues and run-tests remain discoverable without a duplicate workflow.
  • Re-enables the Workflow Intelligence Jest suite now that the stale count mismatch is fixed.
  • Updates WIS tests to reflect the current canonical set: 10 WIS core workflows plus bob_orchestration, with no agent_handoff.

Fixes #766.

Validation

  • npx yaml-lint .aiox-core/data/workflow-patterns.yaml
  • npm test -- .aiox-core/workflow-intelligence/__tests__/integration.test.js .aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js tests/core/workflow-navigator-integration.test.js --runInBand (3 suites, 136 tests)
  • npm test -- .aiox-core/workflow-intelligence/__tests__ tests/integration/workflow-intelligence tests/unit/workflow-intelligence --runInBand (11 suites, 370 tests)
  • npm run lint
  • npm run typecheck
  • npm run test:ci -- --silent (350 suites passed, 8717 tests passed, 12 suites skipped)
  • npm run validate:manifest

Summary by CodeRabbit

  • New Features

    • Extended story development workflow with additional QA-related commands and improved transition handling for issue resolution and verification.
  • Tests

    • Updated workflow intelligence and integration tests to reflect enhanced workflow configurations and system changes.

Review Change Stack

@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
aiox-core Ready Ready Preview, Comment May 18, 2026 4:29pm

Request Review

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Walkthrough

This PR removes the redundant agent_handoff workflow and enhances story_development with additional QA remediation commands and transitions. Workflow registry metadata is updated, Jest configuration enables workflow intelligence tests, and all test assertions are updated to reflect 11 total workflows instead of 10.

Changes

Workflow Pattern Refinement and Test Updates

Layer / File(s) Summary
Workflow Pattern Refinement
.aiox-core/data/workflow-patterns.yaml
Remove agent_handoff workflow entirely. Extend story_development by adding fix-qa-issues and run-tests to key_commands. Expand qa_reviewed transition with fix-qa-issues as additional next step, and introduce new transitions fixes_applied and qa_fix_request_resolved routing to run-tests and pre-push-quality-gate respectively.
Entity Registry and Install Manifest Metadata
.aiox-core/data/entity-registry.yaml, .aiox-core/install-manifest.yaml
Update entity registry lastUpdated timestamp and workflow-patterns checksum/lastVerified fields. Regenerate install manifest with new generated_at timestamp and updated sha256/size hashes for entity-registry.yaml, workflow-patterns.yaml, integration.test.js, and workflow-registry.test.js.
Jest Configuration
jest.config.js
Remove .aiox-core/workflow-intelligence/__tests__/ from testPathIgnorePatterns to enable execution of workflow intelligence tests.
Workflow Registry Unit Tests
.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js
Update loadWorkflows() and getWorkflowNames() assertions to expect 11 workflows. Add test case verifying agent_handoff is undefined. Include bob_orchestration in expected workflow names and explicitly verify agent_handoff absence. Update getStats() assertions for totalWorkflows and workflowsWithTransitions to 11.
Integration Test Assertions
.aiox-core/workflow-intelligence/__tests__/integration.test.js, tests/core/workflow-navigator-integration.test.js
Update WIS getWorkflowNames() and getStats() to expect 11 workflows. Refactor AC5 Bob orchestration assertions to verify story_development contains cross-agent handoff commands and QA/final-verification transitions. Replace agent_handoff pattern detection test with story_development detection for develop completed state. Add detection test for fix-qa-issues completed mapping to story_development with qa_fix_request_resolved state.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • SynkraAI/aiox-core#656: Both PRs adjust QA-related handoff and story lifecycle behavior by refining story_development transitions and removing workflow redundancy.

Suggested labels

area: workflows, type: test, area: core

Suggested reviewers

  • Pedrovaleriolopez
  • oalanicolas
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing the redundant agent_handoff workflow from WIS.
Linked Issues check ✅ Passed All coding requirements from issue #766 are met: agent_handoff workflow removed, QA commands integrated into story_development, tests updated to expect 11 workflows, and agent_handoff confirmed absent.
Out of Scope Changes check ✅ Passed All changes are directly scoped to issue #766: removing agent_handoff, integrating QA flows into story_development, and updating WIS tests accordingly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/remove-agent-handoff-workflow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added type: test Test coverage and quality area: docs Documentation (docs/) labels May 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 Coverage Report

Coverage report not available

📈 Full coverage report available in Codecov


Generated by PR Automation (Story 6.1)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
.aiox-core/workflow-intelligence/__tests__/integration.test.js (1)

8-8: 💤 Low value

Relative import violates coding guidelines.

Line 8 uses a relative import path ('../index'). As per coding guidelines, absolute imports should be used instead of relative imports in all code.

Consider refactoring to absolute import
-const wis = require('../index');
+const wis = require('.aiox-core/workflow-intelligence/index');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.aiox-core/workflow-intelligence/__tests__/integration.test.js at line 8,
Replace the relative require('../index') in the test (the line that assigns to
variable wis) with an absolute module import of the workflow-intelligence
package/module (use the package name or its published path instead of ../index),
update any package.json exports if necessary so the absolute import resolves,
and run the tests to confirm the change.
.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js (1)

9-13: 💤 Low value

Relative import violates coding guidelines.

The require statement on line 13 uses a relative path ('../registry/workflow-registry'). As per coding guidelines, absolute imports should be used instead of relative imports in all code.

While relative imports are common in test files, the guideline applies to **/*.{js,jsx,ts,tsx} without exceptions.

Consider refactoring to absolute import
-const {
-  WorkflowRegistry,
-  createWorkflowRegistry,
-  DEFAULT_CACHE_TTL,
-} = require('../registry/workflow-registry');
+const {
+  WorkflowRegistry,
+  createWorkflowRegistry,
+  DEFAULT_CACHE_TTL,
+} = require('.aiox-core/workflow-intelligence/registry/workflow-registry');
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js around
lines 9 - 13, The test uses a relative require for the exports WorkflowRegistry,
createWorkflowRegistry, and DEFAULT_CACHE_TTL; replace the relative import
('../registry/workflow-registry') with the project's absolute module import (use
the repository/module root alias) so the test requires the module via its
absolute path (importing WorkflowRegistry, createWorkflowRegistry,
DEFAULT_CACHE_TTL) rather than a relative ../ path to comply with the coding
guideline.
tests/core/workflow-navigator-integration.test.js (1)

22-76: 💤 Low value

Multiple relative imports in jest.mock() calls violate coding guidelines.

Lines 22-76 contain numerous jest.mock() calls with relative paths (e.g., '../../.aiox-core/core/session/context-detector'). As per coding guidelines, absolute imports should be used instead of relative imports in all code.

Note: In Jest test files, relative paths in jest.mock() are standard practice for mocking adjacent modules.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/core/workflow-navigator-integration.test.js` around lines 22 - 76,
Replace the relative module paths used in the jest.mock() calls with the
project's approved absolute import aliases so the mocks follow coding
guidelines; update each mocked module reference (context-detector,
git-config-detector, project-status-loader, config-resolver,
greeting-preference-manager, permissions, session-state, surface-checker) to use
the configured absolute import (e.g., the project's module alias or package
name) in the jest.mock(...) calls and keep the mock implementations unchanged
(ensure names like loadProjectStatus, resolveConfig, PermissionMode,
SessionState, SurfaceChecker remain targeted the same way).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.aiox-core/workflow-intelligence/__tests__/integration.test.js:
- Line 8: Replace the relative require('../index') in the test (the line that
assigns to variable wis) with an absolute module import of the
workflow-intelligence package/module (use the package name or its published path
instead of ../index), update any package.json exports if necessary so the
absolute import resolves, and run the tests to confirm the change.

In @.aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js:
- Around line 9-13: The test uses a relative require for the exports
WorkflowRegistry, createWorkflowRegistry, and DEFAULT_CACHE_TTL; replace the
relative import ('../registry/workflow-registry') with the project's absolute
module import (use the repository/module root alias) so the test requires the
module via its absolute path (importing WorkflowRegistry,
createWorkflowRegistry, DEFAULT_CACHE_TTL) rather than a relative ../ path to
comply with the coding guideline.

In `@tests/core/workflow-navigator-integration.test.js`:
- Around line 22-76: Replace the relative module paths used in the jest.mock()
calls with the project's approved absolute import aliases so the mocks follow
coding guidelines; update each mocked module reference (context-detector,
git-config-detector, project-status-loader, config-resolver,
greeting-preference-manager, permissions, session-state, surface-checker) to use
the configured absolute import (e.g., the project's module alias or package
name) in the jest.mock(...) calls and keep the mock implementations unchanged
(ensure names like loadProjectStatus, resolveConfig, PermissionMode,
SessionState, SurfaceChecker remain targeted the same way).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 900b40cf-947d-42d5-a079-002794f2c6d3

📥 Commits

Reviewing files that changed from the base of the PR and between 03e4d7d and f36cdec.

📒 Files selected for processing (7)
  • .aiox-core/data/entity-registry.yaml
  • .aiox-core/data/workflow-patterns.yaml
  • .aiox-core/install-manifest.yaml
  • .aiox-core/workflow-intelligence/__tests__/integration.test.js
  • .aiox-core/workflow-intelligence/__tests__/workflow-registry.test.js
  • jest.config.js
  • tests/core/workflow-navigator-integration.test.js
💤 Files with no reviewable changes (1)
  • jest.config.js

@rafaelscosta
rafaelscosta merged commit e9d088c into main May 18, 2026
42 checks passed
@rafaelscosta
rafaelscosta deleted the fix/remove-agent-handoff-workflow branch May 18, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation (docs/) type: test Test coverage and quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Agent Handoff Workflow is 100% Redundant of Story Development — Should Be Removed

1 participant